# define _CRT_SECURE_NO_WARNINGS
#include"binarytree.h"
 

bool isSameTree(BTNode* p, BTNode* q) {
	if (p == NULL && q == NULL)
		return true;
	if (p == NULL || q == NULL)
		return false;
	if (p->val != q->val)
		return false;
	return isSameTree(p->left, q->left) && isSameTree(p->right, q->right);
}


int main()
{
	BTDataType a[] = "ABD##E#H##CF##G##";
	int i = 0;
	BTNode* root = BTreeCreate(a,&i);

	printf("BTreeSize:%d\n", BTreeSize(root));

	printf("BTLeafSize:%d\n", BTLeafSize(root));

	printf("BTLevelKSize:%d\n", BTLevelKSize(root,3));

	BTNode* node = BTreeFind(root, 'C');
	printf("%c\n",node->val);

	PrevOrder(root);
	printf("\n");

	InOrder(root);
	printf("\n");

	PostOrder(root);
	printf("\n");

	BTLevelOrder(root);
	printf("\n");

	printf("BTComplete:%d\n", BTComplete(root));

	BTreeDestory(root);

	return 0;
}